package com.mikelouis.test.scala.proginscala.chapter16

/**
 * Created by yuazhu on 1/19/2015.
 */
object first {
  def main(args: Array[String]) {
    // implicit type
    val fruit = List("apples", "oranges", "pears")
    val nums = List(1, 2, 3, 4)
    val diag3 =
      List(
        List(1, 0, 0),
        List(0, 1, 0),
        List(0, 0, 1)
      )
    val empty = List()

    // explicit type
    val fruit1: List[String] = List("apples", "oranges", "pears")
    val nums1: List[Int] = List(1, 2, 3, 4)
    val diag31: List[List[Int]] =
      List(
        List(1, 0, 0),
        List(0, 1, 0),
        List(0, 0, 1)
      )
    val empty1: List[Nothing] = List()
  }

}
